package org.smile.homework01.kevin.DockerYard;

import java.util.Scanner;

public class Docker extends Ships{
    Scanner in = new Scanner(System.in);
    private String shipName;
    private String gpsType;
    private String lightType;
    private String commType;
    public Docker(){
        System.out.println("请选择船型");
        shipName = in.next();
        System.out.println("请输入导航品牌");
        gpsType = in.next();
        System.out.println("请输入照明设备品牌");
        lightType = in.next();
        System.out.println("请输入通讯模块品牌品牌");
        commType = in.next();
        if("ShipT".equals(shipName)) {
            ShipT ship = new ShipT();
            GPS gps = ship.InstallGPS(gpsType);
            Communication communication = ship.InstallCommunication(commType);
            Lighting lighting = ship.InstallLighting(lightType);

        }
        if("ShipY".equals(shipName)) {
            ShipY ship = new ShipY();
            GPS gps = ship.InstallGPS(gpsType);
            Communication communication = ship.InstallCommunication(commType);
            Lighting lighting = ship.InstallLighting(lightType);
        }
    }

    @Override
    public void install() {
        System.out.println(this.shipName + "所有设备已安装完成");
    }
}
